import { type } from "os";

export declare namespace TYPE {
  type InitialState = {
    loading: boolean;
    token: string;
    user: User;
    accessData: string;
  };

  type User = {
    id: number;
    userName: string;
    password: string;
    name: string;
    phone: string;
    email: string;
    status: boolean;
    roleId: number;
    remark: string;
    addTime: string;
    access?: string;
  };

  type MenuItem = {
    id: number;
    pid: number;
    name: string;
    path: string;
    icon?: string;
    children?: MenuItem[];
  };

  type RouteItem = {
    id?: string;
    name?: string;
    path: string;
    icon?: any;
    component?: string;
    element?: any;

    routes?: RouteItem[];
    children?: RouteItem[];
    layout?: boolean;
    redirect?: string;
  };

  type Response = {
    success: boolean;
    data: any;
    msg: string;
  };

  type TableData = {
    success: boolean;
    total: number;
    data: any[];
  };

  type Data = {
    token: string;
    user: User;
    menu: MenuItem[];
    res: ResItem[];
    route: RouteItem[];
    accessData: string;
  };

  type LoginParams = {
    username: string;
    password: string;
    code: string;
  };

  type ResItem = {
    id: number;
    method: string;
    name: string;
    params: string;
    path: string;
  };

  type LogItem = {
    id: number;
    userId: number;
    userName: string;
    ip: string;
    userAgent: string;
    path: string;
    params: string;
    status: number;
    method: string;
    errMsg: string;
    atTime: string;
  };

  type RoleItem = {
    id: number;
    name: string;
    menu: string;
    res: string;
  };

  type TreeItem = {
    key: string | number;
    title: string;
    children?: TreeItem[];
  };

  type BottleItem = {
    id: number;

    name: string;
    useFor: number;

    price: number;
    tag: string;

    color: string;
    brand: string;

    height: number;
    width: number;

    sequ: number;
    remark: string;

    images: string;

    addTime: string;

    num0: number;
    num1: number;
    num2: number;
  };
};
